3.164 \(\int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

Optimal. Leaf size=156 \[ \frac{2 \sin ^5(c+d x)}{33 a^4 d}-\frac{20 \sin ^3(c+d x)}{99 a^4 d}+\frac{10 \sin (c+d x)}{33 a^4 d}+\frac{4 i \cos ^5(c+d x)}{33 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{7 i \cos ^3(c+d x)}{99 a d (a+i a \tan (c+d x))^3}+\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4} \]

[Out]

(10*Sin[c + d*x])/(33*a^4*d) - (20*Sin[c + d*x]^3)/(99*a^4*d) + (2*Sin[c + d*x]^5)/(33*a^4*d) + ((I/11)*Cos[c
+ d*x]^3)/(d*(a + I*a*Tan[c + d*x])^4) + (((7*I)/99)*Cos[c + d*x]^3)/(a*d*(a + I*a*Tan[c + d*x])^3) + (((4*I)/
33)*Cos[c + d*x]^5)/(d*(a^4 + I*a^4*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.147537, antiderivative size = 156, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3502, 3500, 2633} \[ \frac{2 \sin ^5(c+d x)}{33 a^4 d}-\frac{20 \sin ^3(c+d x)}{99 a^4 d}+\frac{10 \sin (c+d x)}{33 a^4 d}+\frac{4 i \cos ^5(c+d x)}{33 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{7 i \cos ^3(c+d x)}{99 a d (a+i a \tan (c+d x))^3}+\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(10*Sin[c + d*x])/(33*a^4*d) - (20*Sin[c + d*x]^3)/(99*a^4*d) + (2*Sin[c + d*x]^5)/(33*a^4*d) + ((I/11)*Cos[c
+ d*x]^3)/(d*(a + I*a*Tan[c + d*x])^4) + (((7*I)/99)*Cos[c + d*x]^3)/(a*d*(a + I*a*Tan[c + d*x])^3) + (((4*I)/
33)*Cos[c + d*x]^5)/(d*(a^4 + I*a^4*Tan[c + d*x]))

Rule 3502

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(b*f*(m + 2*n)), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rule 3500

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(2*d^2
*(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1))/(b*f*(m + 2*n)), x] - Dist[(d^2*(m - 2))/(b^2*(m + 2*n
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4}+\frac{7 \int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{11 a}\\ &=\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4}+\frac{7 i \cos ^3(c+d x)}{99 a d (a+i a \tan (c+d x))^3}+\frac{14 \int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{33 a^2}\\ &=\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4}+\frac{7 i \cos ^3(c+d x)}{99 a d (a+i a \tan (c+d x))^3}+\frac{4 i \cos ^5(c+d x)}{33 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{10 \int \cos ^5(c+d x) \, dx}{33 a^4}\\ &=\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4}+\frac{7 i \cos ^3(c+d x)}{99 a d (a+i a \tan (c+d x))^3}+\frac{4 i \cos ^5(c+d x)}{33 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac{10 \operatorname{Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{33 a^4 d}\\ &=\frac{10 \sin (c+d x)}{33 a^4 d}-\frac{20 \sin ^3(c+d x)}{99 a^4 d}+\frac{2 \sin ^5(c+d x)}{33 a^4 d}+\frac{i \cos ^3(c+d x)}{11 d (a+i a \tan (c+d x))^4}+\frac{7 i \cos ^3(c+d x)}{99 a d (a+i a \tan (c+d x))^3}+\frac{4 i \cos ^5(c+d x)}{33 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.353103, size = 117, normalized size = 0.75 \[ -\frac{i \sec ^4(c+d x) (-231 i \sin (c+d x)-891 i \sin (3 (c+d x))+385 i \sin (5 (c+d x))+21 i \sin (7 (c+d x))-924 \cos (c+d x)-1188 \cos (3 (c+d x))+308 \cos (5 (c+d x))+12 \cos (7 (c+d x)))}{6336 a^4 d (\tan (c+d x)-i)^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((-I/6336)*Sec[c + d*x]^4*(-924*Cos[c + d*x] - 1188*Cos[3*(c + d*x)] + 308*Cos[5*(c + d*x)] + 12*Cos[7*(c + d*
x)] - (231*I)*Sin[c + d*x] - (891*I)*Sin[3*(c + d*x)] + (385*I)*Sin[5*(c + d*x)] + (21*I)*Sin[7*(c + d*x)]))/(
a^4*d*(-I + Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.107, size = 240, normalized size = 1.5 \begin{align*} 2\,{\frac{1}{{a}^{4}d} \left ({\frac{4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{10}}}-{\frac{{\frac{67\,i}{4}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}-{\frac{22\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{8}}}+{\frac{{\frac{385\,i}{12}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}+{\frac{{\frac{201\,i}{64}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}-{\frac{8}{11\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{11}}}+{\frac{104}{9\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{9}}}-{\frac{61}{2\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{7}}}+{\frac{105}{4\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{5}}}-{\frac{267}{32\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{15}{16\,\tan \left ( 1/2\,dx+c/2 \right ) -16\,i}}-{\frac{{\frac{i}{64}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}-{\frac{1}{96\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{3}}}+1/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-1} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^4,x)

[Out]

2/d/a^4*(4*I/(tan(1/2*d*x+1/2*c)-I)^10-67/4*I/(tan(1/2*d*x+1/2*c)-I)^4-22*I/(tan(1/2*d*x+1/2*c)-I)^8+385/12*I/
(tan(1/2*d*x+1/2*c)-I)^6+201/64*I/(tan(1/2*d*x+1/2*c)-I)^2-8/11/(tan(1/2*d*x+1/2*c)-I)^11+104/9/(tan(1/2*d*x+1
/2*c)-I)^9-61/2/(tan(1/2*d*x+1/2*c)-I)^7+105/4/(tan(1/2*d*x+1/2*c)-I)^5-267/32/(tan(1/2*d*x+1/2*c)-I)^3+15/16/
(tan(1/2*d*x+1/2*c)-I)-1/64*I/(tan(1/2*d*x+1/2*c)+I)^2-1/96/(tan(1/2*d*x+1/2*c)+I)^3+1/16/(tan(1/2*d*x+1/2*c)+
I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.32921, size = 336, normalized size = 2.15 \begin{align*} \frac{{\left (-33 i \, e^{\left (14 i \, d x + 14 i \, c\right )} - 693 i \, e^{\left (12 i \, d x + 12 i \, c\right )} + 2079 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 1155 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 693 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 297 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 77 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 9 i\right )} e^{\left (-11 i \, d x - 11 i \, c\right )}}{12672 \, a^{4} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/12672*(-33*I*e^(14*I*d*x + 14*I*c) - 693*I*e^(12*I*d*x + 12*I*c) + 2079*I*e^(10*I*d*x + 10*I*c) + 1155*I*e^(
8*I*d*x + 8*I*c) + 693*I*e^(6*I*d*x + 6*I*c) + 297*I*e^(4*I*d*x + 4*I*c) + 77*I*e^(2*I*d*x + 2*I*c) + 9*I)*e^(
-11*I*d*x - 11*I*c)/(a^4*d)

________________________________________________________________________________________

Sympy [A]  time = 2.02176, size = 301, normalized size = 1.93 \begin{align*} \begin{cases} \frac{\left (- 167196136166129664 i a^{28} d^{7} e^{39 i c} e^{3 i d x} - 3511118859488722944 i a^{28} d^{7} e^{37 i c} e^{i d x} + 10533356578466168832 i a^{28} d^{7} e^{35 i c} e^{- i d x} + 5851864765814538240 i a^{28} d^{7} e^{33 i c} e^{- 3 i d x} + 3511118859488722944 i a^{28} d^{7} e^{31 i c} e^{- 5 i d x} + 1504765225495166976 i a^{28} d^{7} e^{29 i c} e^{- 7 i d x} + 390124317720969216 i a^{28} d^{7} e^{27 i c} e^{- 9 i d x} + 45598946227126272 i a^{28} d^{7} e^{25 i c} e^{- 11 i d x}\right ) e^{- 36 i c}}{64203316287793790976 a^{32} d^{8}} & \text{for}\: 64203316287793790976 a^{32} d^{8} e^{36 i c} \neq 0 \\\frac{x \left (e^{14 i c} + 7 e^{12 i c} + 21 e^{10 i c} + 35 e^{8 i c} + 35 e^{6 i c} + 21 e^{4 i c} + 7 e^{2 i c} + 1\right ) e^{- 11 i c}}{128 a^{4}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a+I*a*tan(d*x+c))**4,x)

[Out]

Piecewise(((-167196136166129664*I*a**28*d**7*exp(39*I*c)*exp(3*I*d*x) - 3511118859488722944*I*a**28*d**7*exp(3
7*I*c)*exp(I*d*x) + 10533356578466168832*I*a**28*d**7*exp(35*I*c)*exp(-I*d*x) + 5851864765814538240*I*a**28*d*
*7*exp(33*I*c)*exp(-3*I*d*x) + 3511118859488722944*I*a**28*d**7*exp(31*I*c)*exp(-5*I*d*x) + 150476522549516697
6*I*a**28*d**7*exp(29*I*c)*exp(-7*I*d*x) + 390124317720969216*I*a**28*d**7*exp(27*I*c)*exp(-9*I*d*x) + 4559894
6227126272*I*a**28*d**7*exp(25*I*c)*exp(-11*I*d*x))*exp(-36*I*c)/(64203316287793790976*a**32*d**8), Ne(6420331
6287793790976*a**32*d**8*exp(36*I*c), 0)), (x*(exp(14*I*c) + 7*exp(12*I*c) + 21*exp(10*I*c) + 35*exp(8*I*c) +
35*exp(6*I*c) + 21*exp(4*I*c) + 7*exp(2*I*c) + 1)*exp(-11*I*c)/(128*a**4), True))

________________________________________________________________________________________

Giac [A]  time = 1.15726, size = 266, normalized size = 1.71 \begin{align*} \frac{\frac{33 \,{\left (12 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 21 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 11\right )}}{a^{4}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{3}} + \frac{5940 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{10} - 39501 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} - 141075 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} + 313236 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 479556 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 516054 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 397914 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 214500 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 79024 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 17765 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2155}{a^{4}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{11}}}{3168 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

1/3168*(33*(12*tan(1/2*d*x + 1/2*c)^2 + 21*I*tan(1/2*d*x + 1/2*c) - 11)/(a^4*(tan(1/2*d*x + 1/2*c) + I)^3) + (
5940*tan(1/2*d*x + 1/2*c)^10 - 39501*I*tan(1/2*d*x + 1/2*c)^9 - 141075*tan(1/2*d*x + 1/2*c)^8 + 313236*I*tan(1
/2*d*x + 1/2*c)^7 + 479556*tan(1/2*d*x + 1/2*c)^6 - 516054*I*tan(1/2*d*x + 1/2*c)^5 - 397914*tan(1/2*d*x + 1/2
*c)^4 + 214500*I*tan(1/2*d*x + 1/2*c)^3 + 79024*tan(1/2*d*x + 1/2*c)^2 - 17765*I*tan(1/2*d*x + 1/2*c) - 2155)/
(a^4*(tan(1/2*d*x + 1/2*c) - I)^11))/d